#include <stdio.h>
#include <stdlib.h>

int immobility()
{
 /*8048580:	55                   	push   %ebp
 8048581:	89 e5                	mov    %esp,%ebp
 8048583:	83 ec 28             	sub    $0x28,%esp
 8048586:	8d 45 ec             	lea    -0x14(%ebp),%eax*/
	int a;

 /*8048589:	89 44 24 04          	mov    %eax,0x4(%esp)
 804858d:	c7 04 24 34 87 04 08 	movl   $0x8048734,(%esp)
 8048594:	e8 c7 fe ff ff       	call   8048460 <__isoc99_scanf@plt>*/
	scanf("%d", &a);

 /*8048599:	8b 45 ec             	mov    -0x14(%ebp),%eax	// a
 804859c:	c1 e0 02             	shl    $0x2,%eax		// a<<2
 804859f:	89 04 24             	mov    %eax,(%esp)
 80485a2:	e8 89 fe ff ff       	call   8048430 <malloc@plt>
 80485a7:	89 45 f0             	mov    %eax,-0x10(%ebp)*/
	int *p = malloc(a * 2);

 /*80485aa:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)*/
	int i = 0;

 /*80485b1:	eb 1b                	jmp    80485ce <immobility+0x4e>
 80485b3:	8b 45 f4             	mov    -0xc(%ebp),%eax		// i
 80485b6:	8d 14 85 00 00 00 00 	lea    0x0(,%eax,4),%edx	// edx=i*4
 80485bd:	8b 45 f0             	mov    -0x10(%ebp),%eax		// eax=p
 80485c0:	01 d0                	add    %edx,%eax			// eax=p+i*4
 80485c2:	8b 55 f4             	mov    -0xc(%ebp),%edx		// edx=i
 80485c5:	83 c2 01             	add    $0x1,%edx			// edx=i+1
 80485c8:	89 10                	mov    %edx,(%eax)			// (p+i*4)=i+1
 80485ca:	83 45 f4 01          	addl   $0x1,-0xc(%ebp)		// i++
 80485ce:	8b 45 ec             	mov    -0x14(%ebp),%eax		// eax=a
 80485d1:	39 45 f4             	cmp    %eax,-0xc(%ebp)		// i?=a
 80485d4:	7c dd                	jl     80485b3 <immobility+0x33>*/
	for (i = 0; i < a; i++) {
		*(p + i) = i + 1;
	}

 /*80485d6:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)		// i=0
 80485dd:	eb 25                	jmp    8048604 <immobility+0x84>
 80485df:	8b 45 f4             	mov    -0xc(%ebp),%eax		// eax=i
 80485e2:	8d 14 85 00 00 00 00 	lea    0x0(,%eax,4),%edx	// edx=i*4
 80485e9:	8b 45 f0             	mov    -0x10(%ebp),%eax		// p
 80485ec:	01 d0                	add    %edx,%eax			// eax=p+i*4
 80485ee:	8b 00                	mov    (%eax),%eax			// eax=*p
 80485f0:	89 44 24 04          	mov    %eax,0x4(%esp)		// (esp+4)=*p
 80485f4:	c7 04 24 37 87 04 08 	movl   $0x8048737,(%esp)
 80485fb:	e8 10 fe ff ff       	call   8048410 <printf@plt>
 8048600:	83 45 f4 01          	addl   $0x1,-0xc(%ebp)		// i+1
 8048604:	8b 45 ec             	mov    -0x14(%ebp),%eax		// a
 8048607:	39 45 f4             	cmp    %eax,-0xc(%ebp)		// i?=a
 804860a:	7c d3                	jl     80485df <immobility+0x5f>*/
	for (i = 0; i < a; i++) {
		printf("\t%d\n", *(p + i));
	}

 /*804860c:	8b 45 f0             	mov    -0x10(%ebp),%eax
 804860f:	89 04 24             	mov    %eax,(%esp)
 8048612:	e8 09 fe ff ff       	call   8048420 <free@plt>*/
	free(p);

 /*8048617:	b8 00 00 00 00       	mov    $0x0,%eax
 804861c:	c9                   	leave  
 804861d:	c3                   	ret    */
	return 0;
}

void dynamic()
{
 /*804861e:	55                   	push   %ebp
 804861f:	89 e5                	mov    %esp,%ebp
 8048621:	83 ec 28             	sub    $0x28,%esp
 8048624:	c7 45 f0 00 00 00 00 	movl   $0x0,-0x10(%ebp)*/
	int i;
	int *p;

 /*804862b:	eb 1e                	jmp    804864b <dynamic+0x2d>
 804862d:	c7 04 24 04 00 00 00 	movl   $0x4,(%esp)
 8048634:	e8 f7 fd ff ff       	call   8048430 <malloc@plt>
 8048639:	89 45 f4             	mov    %eax,-0xc(%ebp)	// p=malloc(4)
 804863c:	8b 45 f0             	mov    -0x10(%ebp),%eax	// i
 804863f:	8d 50 0b             	lea    0xb(%eax),%edx	// i+11
 8048642:	8b 45 f4             	mov    -0xc(%ebp),%eax	// eax=p
 8048645:	89 10                	mov    %edx,(%eax)		// *p=i+11
 8048647:	83 45 f0 01          	addl   $0x1,-0x10(%ebp)	// i+1
 804864b:	83 7d f0 09          	cmpl   $0x9,-0x10(%ebp)	// 9?=i
 804864f:	7e dc                	jle    804862d <dynamic+0xf>*/
	for (i = 0; i < 10; i++) {
		p = (int *)malloc(4);
		*p = i + 11;
	}

 /*8048651:	c7 45 f0 00 00 00 00 	movl   $0x0,-0x10(%ebp)
 8048658:	eb 25                	jmp    804867f <dynamic+0x61>
 804865a:	8b 45 f0             	mov    -0x10(%ebp),%eax		// eax=i
 804865d:	8d 14 85 00 00 00 00 	lea    0x0(,%eax,4),%edx	// edx=i*4
 8048664:	8b 45 f4             	mov    -0xc(%ebp),%eax		// eax=p
 8048667:	01 d0                	add    %edx,%eax			// eax=p+i*4
 8048669:	8b 00                	mov    (%eax),%eax			// eax=*p
 804866b:	89 44 24 04          	mov    %eax,0x4(%esp)		// (esp+4)=*p
 804866f:	c7 04 24 37 87 04 08 	movl   $0x8048737,(%esp)
 8048676:	e8 95 fd ff ff       	call   8048410 <printf@plt>
 804867b:	83 45 f0 01          	addl   $0x1,-0x10(%ebp)		// i+1
 804867f:	83 7d f0 09          	cmpl   $0x9,-0x10(%ebp)		// 9?=i
 8048683:	7e d5                	jle    804865a <dynamic+0x3c>*/
	for (i = 0; i < 10; i++) {
		printf("\t%d\n", *(p + i));
	}

 /*8048685:	c9                   	leave  
 8048686:	c3                   	ret  */
}  

int main()
{
 /*8048687:	55                   	push   %ebp
 8048688:	89 e5                	mov    %esp,%ebp
 804868a:	83 e4 f0             	and    $0xfffffff0,%esp
 804868d:	e8 8c ff ff ff       	call   804861e <dynamic>*/
	dynamic();

 /*8048692:	b8 00 00 00 00       	mov    $0x0,%eax
 8048697:	c9                   	leave  
 8048698:	c3                   	ret    
 8048699:	66 90                	xchg   %ax,%ax
 804869b:	66 90                	xchg   %ax,%ax
 804869d:	66 90                	xchg   %ax,%ax
 804869f:	90                   	nop*/
	return 0;
}

